<?php
declare (strict_types = 1);
namespace app\user\service\user;

use app\common\service\BaseService;
use think\facade\Request;
use app\user\logic\user\Vip as VipLogic;

/**
 * 会员中心接口类
 */
class Vip extends BaseService
{

    public function basic()
    {
        $data = app(VipLogic::class)->basic();

        return $this->parseToData($data, 1, '获取成功');
    }

    /**
     * 会员购买
     * Author 亓官雨树<lucky.max@foxmail.com>
     * Date：   2020-05-25
     */
    public function buy()
    {
        $param = Request::post();
        $data = app(VipLogic::class)->buy($param);

        return $this->parseToData($data, 1, '创建订单成功');
    }

    public function log()
    {
        $data = app(VipLogic::class)->userVipLog();

        return $this->parseToData($data, 1, '获取成功');
    }
}
